package com.sino.operation.controller;

import com.sino.operation.commons.response.CenterResponseEntity;
import com.sino.operation.entity.SysTeller;
import com.sino.operation.service.basic.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/Auth")
public class LoginController {

    @Autowired
    private LoginService loginService;

    @PostMapping("/login")
    public CenterResponseEntity login(@RequestBody SysTeller sysTeller) {
        return loginService.login(sysTeller);
    }

    @PostMapping("/loginOut")
    public CenterResponseEntity loginOut() {
        return loginService.loginOut();
    }

}
